import React from 'react';

import './index.less';

export default class view extends React.Component {
    static propTypes = {
        name: React.PropTypes.string,
        label: React.PropTypes.string,
        onClick: React.PropTypes.func,
        onDelete: React.PropTypes.func
    };

    constructor(props, context) {

        super(props, context);
        this.state = {

        };
    }
    componentWillMount() {
        this._isMounted = true;

    }

    componentDidMount() {

    }

    componentWillUnmount() {
        this._isMounted = false;
    }

    render() {

        return (
            <div className="ori-chip-root">
                <span onClick={this.props.onClick}>{this.props.label}</span>
                {this.props.onDelete && <span className="close" onClick={this.props.onDelete}></span>}
            </div>
        );
    }
}
